<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Manipulação conexões com a base de dados
 *
 * @author ox
 */
class Conexao {
    
    private static $DatabaseHost = 'localhost';
    private static $DatabaseUser = 'root';
    private static $DatabasePass = '123456';
    private static $DatabaseName = 'rocklink';
    private static $Instancia = null;
    
    public static function Abrir() {
        if (self::$Instancia === null) {
            self::$Instancia = mysql_connect(self::$DatabaseHost, self::$DatabaseUser);
            mysql_select_db(self::$DatabaseName);
        }
    }
    
    public static function Close() {
        if (self::$Instancia !== null) {
            mysql_close(self::$Instancia);
        }
    }
}

?>
